package com.yxlgateway.acturator.endpoint;

import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.Map;

@Component
@Endpoint(id = "myservice")
public class MyServiceEndPoint {
    @ReadOperation
    public Map getOperation(){
        return Collections.singletonMap("endpioifds","aaaaaaaaaaaaaaaaaaaaa");
    }

    @WriteOperation
    public void setOperation(){
        System.out.println("okookokookokokok");
    }
}
